package com.headingdata.d8_generics_class;

public class MyArrayList <E>{

    private Object[] arr = new Object[20];
    private int size; //记录当前位置
    public boolean add(E e){
        arr[size++] = e;
        return true;
    }

    public E get(int index){
        return (E)arr[index];
    }
}
